// 云对象教程: https://uniapp.dcloud.net.cn/uniCloud/cloud-obj
// jsdoc语法提示教程：https://ask.dcloud.net.cn/docs/#//ask.dcloud.net.cn/article/129
module.exports = {
  _before: function () {
    // 通用预处理器
  },
  async list({ pageSize = 8, pageNum = 1, select = false } = {}) {
    // pageSize = Math.min(pageSize,20);
    // let skip = (pageNum - 1)*pageSize;
    // let wre = {enable:true}
    // if(select) wre.select = true;
    const dbJQL = uniCloud.databaseForJQL({
      clientInfo: this.getClientInfo(),
    });
    return await dbJQL
      .collection('dc-activity-banner')
      .where(`checked == true`)
      .orderBy('sort asc')
      .get();
  },
};
